﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace TireStore.Models
{
    public class AdminResetModel
    {
        [Key]
        public int Id { get; set; }

        [Required]
        public string Username { get; set; }

        [Required(ErrorMessage = "(*)")]
        [StringLength(3, ErrorMessage = "Mật khẩu > 3 ký tự")]
        public string NewPassword { get; set; }

        [Required(ErrorMessage = "(*)")]
        [StringLength(3, ErrorMessage = "Mật khẩu > 3 ký tự")]
        [Compare("NewPassword", ErrorMessage = "Mật khẩu éo giống nhau")]
        public string ConfirmPassword { get; set; }

        [Required(ErrorMessage = "(*)")]
        [StringLength(3, ErrorMessage = "Mật khẩu > 3 ký tự")]
        //[Remote("CheckPass", "Admin", ErrorMessage = "Mật khẩu cũ khônkg đúng")]
        public string Password { get; set; }

        //public bool Active { get; set; }
        //public DateTime? CreatedDate { get; set; }
        //public string Image { get; set; }
    }
}